<?php

$num = 23;
$str = '23abc';
if( $num == $str ){
  echo 'abc';
}else{
  echo '123';
}